package com.nbgroup.dao;

import com.nbgroup.entity.Exhibition;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface ExhibitionRepositoty extends JpaRepository<Exhibition,Integer>, JpaSpecificationExecutor<Exhibition> {

    @Query("select e from Exhibition e where e.ichnographyId = :icId and e.sts = 1")
    List<Exhibition> findExhibitionByPlatform(@Param("icId") Integer icId);
}
